package com.yenlien.traceyun.business.dao;

import com.yenlien.traceyun.business.entity.Check;
import com.yenlien.traceyun.webase.dao.BaseJpaDao;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * Created by LiuSha on 2020/6/11.
 */
public interface CheckDao extends BaseJpaDao<Check> {
    Check findById(String id);

    @Query(value = "select * from t_check where company_id=?1 AND state =0 ", nativeQuery = true)
    List<Check> findByCompanyId(String companyId);

    @Query(value = "select * from t_check where state =0 ", nativeQuery = true)
    List<Check> findAll();
}
